﻿using Microsoft.Extensions.DependencyInjection;
using Orleans;
using Puppy.CommonService;
using Puppy.Modularity;
using System;

namespace Puppy
{
    public class PuppyActorModule : PuppyModule
    {
        public override void ConfigureServices(ServiceCollectionAccessorContext context)
        {
            context.Services.AddSingleton(service =>
            {
                return service.GetRequiredService<IGrainFactory>().GetGrain<IIDGenerateActor>(Guid.Empty);
            });
        }
    }
}
